package com.qzsoft.zhjd.laboratory.modules.asphaltPenetrometer.service.impl;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.zhjd.common.components.BaseServiceComponent;

import com.qzsoft.zhjd.laboratory.modules.asphaltPenetrometer.mapper.AsphaltPenetrometerResMapper;
import com.qzsoft.zhjd.laboratory.modules.asphaltPenetrometer.entity.AsphaltPenetrometerResEntity;
import com.qzsoft.zhjd.laboratory.modules.asphaltPenetrometer.service.AsphaltPenetrometerResService;


@Service("asphaltPenetrometerResService")
public class AsphaltPenetrometerResServiceImpl extends ServiceImpl<AsphaltPenetrometerResMapper, AsphaltPenetrometerResEntity> implements AsphaltPenetrometerResService {

    @Autowired
    private AsphaltPenetrometerResMapper asphaltPenetrometerResMapper;

    @Autowired
    private BaseServiceComponent baseServiceComponent;

    /**
     * 列表
     */
    @Override
    public IPage<JSONObject> queryPage(Map<String, Object> params) {
        IPage<AsphaltPenetrometerResEntity> page = baseServiceComponent.getPage(params, AsphaltPenetrometerResEntity.class);
        return asphaltPenetrometerResMapper.queryPage(page,params);
    }

    /**
     * 信息
     * @return AsphaltPenetrometerResEntity
     */
    @Override
    public AsphaltPenetrometerResEntity getInfo(String id){
        return getById(id);
    }

    /**
     * 保存
     */
    @Override
    public void saveData(AsphaltPenetrometerResEntity asphaltPenetrometerRes){
        save(asphaltPenetrometerRes);
    }

    /**
     * 修改
     */
    @Override
    public void updateData(AsphaltPenetrometerResEntity asphaltPenetrometerRes){
        updateById(asphaltPenetrometerRes);
    }

    /**
     * 删除单条数据
     * @param id
     */
    @Override
    public void deleteOneData(String id){
        removeById(id);
    }

    /**
     * 删除
     */
    @Override
    public void deleteData(List<String> ids){
        removeByIds(ids);
    }
}
